#ifndef __INTERFACE__
#define __INTERFACE__

#include <iostream>
#include <string>
#include "workday.hpp"

using namespace std;
using namespace boost::posix_time;

struct Interface 
{
    typedef enum {
        WRONG_DATE
    } ErrorType;

    bool exit;
    int tries;
    WorkDay wd;

    static std::string getUserInput(const string &q) {
        string input;
        cout << q << ": ";
        cin >> input;
        return input;
    }

    static void showMessage(const string &msg) {
        cout << msg << std::endl;
    }

    string errorMessage(ErrorType e);
    string dateToStr(time_duration &pd);
    int mainLoop();

    Interface() : exit(false),tries(3) {}

private:
    bool processResults();
};

#endif

